/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GUISudokuOnline.java
 *
 * Created on 28-oct-2012, 13:56:12
 */
package view;

import controller.ControllerSudokuOnline;
import java.awt.BorderLayout;

/**
 *
 * @author Romina
 */
public class GUISudokuOnline extends javax.swing.JFrame {

    private ControllerSudokuOnline ctrl;
    
    public GUISudokuOnline() {
        initComponents();
        PanelFondoGUIAlt F = new PanelFondoGUIAlt();
        this.setResizable(false);
        this.add(F,BorderLayout.CENTER);
        this.pack();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        botonSudMania = new javax.swing.JButton();
        botonSudOnline = new javax.swing.JButton();
        botonWebSud = new javax.swing.JButton();
        botonDesudoku = new javax.swing.JButton();
        bontonSudokusOn = new javax.swing.JButton();
        botonCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Sudokus Online");
        jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));

        botonSudMania.setText("Sudoku Mania");
        botonSudMania.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSudManiaActionPerformed(evt);
            }
        });

        botonSudOnline.setText("Sudoku Online");
        botonSudOnline.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSudOnlineActionPerformed(evt);
            }
        });

        botonWebSud.setText("Web Sudoku");
        botonWebSud.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonWebSudActionPerformed(evt);
            }
        });

        botonDesudoku.setText("Desudoku");
        botonDesudoku.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonDesudokuActionPerformed(evt);
            }
        });

        bontonSudokusOn.setText("Sudokus-online");
        bontonSudokusOn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bontonSudokusOnActionPerformed(evt);
            }
        });

        botonCancelar.setText("Cancelar");
        botonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(43, 43, 43)
                        .addComponent(botonSudMania)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonSudOnline)
                        .addGap(7, 7, 7)
                        .addComponent(bontonSudokusOn))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(115, 115, 115)
                        .addComponent(botonDesudoku)
                        .addGap(18, 18, 18)
                        .addComponent(botonWebSud))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(142, 142, 142)
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(44, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(190, Short.MAX_VALUE)
                .addComponent(botonCancelar)
                .addGap(175, 175, 175))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(43, 43, 43)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonSudMania)
                    .addComponent(botonSudOnline)
                    .addComponent(bontonSudokusOn))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonDesudoku)
                    .addComponent(botonWebSud))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
                .addComponent(botonCancelar)
                .addGap(25, 25, 25))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonCancelarActionPerformed
        this.dispose();
    }//GEN-LAST:event_botonCancelarActionPerformed

    private void botonSudManiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSudManiaActionPerformed
        ctrl = new ControllerSudokuOnline();
        ctrl.actionPerformed(evt);
        this.dispose();
    }//GEN-LAST:event_botonSudManiaActionPerformed

    private void botonSudOnlineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSudOnlineActionPerformed
        ctrl = new ControllerSudokuOnline();
        ctrl.actionPerformed(evt);
        this.dispose();
    }//GEN-LAST:event_botonSudOnlineActionPerformed

    private void bontonSudokusOnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bontonSudokusOnActionPerformed
        ctrl = new ControllerSudokuOnline();
        ctrl.actionPerformed(evt);
        this.dispose();
    }//GEN-LAST:event_bontonSudokusOnActionPerformed

    private void botonDesudokuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonDesudokuActionPerformed
        ctrl = new ControllerSudokuOnline();
        ctrl.actionPerformed(evt);
        this.dispose();
    }//GEN-LAST:event_botonDesudokuActionPerformed

    private void botonWebSudActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonWebSudActionPerformed
        ctrl = new ControllerSudokuOnline();
        ctrl.actionPerformed(evt);
        this.dispose();
    }//GEN-LAST:event_botonWebSudActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GUISudokuOnline.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GUISudokuOnline.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GUISudokuOnline.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GUISudokuOnline.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new GUISudokuOnline().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bontonSudokusOn;
    private javax.swing.JButton botonCancelar;
    private javax.swing.JButton botonDesudoku;
    private javax.swing.JButton botonSudMania;
    private javax.swing.JButton botonSudOnline;
    private javax.swing.JButton botonWebSud;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
